import request from '@/utils/request'
// 查询明细
export function query(data) {
  return request({
    url: `/andon/andonException/query`,
    method: 'post',
    data
  })
}
// 保存
export function save(data) {
  return request({
    url: `/andon/andonException/save`,
    method: 'post',
    data
  })
}

export function batchRemove(data) {
  return request({
    url: `/andon/detail/deleteDetails`,
    method: 'delete',
    data
  })
}

export function remove(id) {
  return request({
    url: `/andon/detail/deleteDetail?id=${id}`,
    method: 'delete'
  })
}
// 用户签到或解除异常登录
export function userVerify(data) {
  return request({
    url: `/andon/andonException/userVerify`,
    method: 'post',
    data
  })
}

// 签到
export function signIn(data) {
  return request({
    url: `/andon/andonException/signin`,
    method: 'post',
    data
  })
}
// 解除
export function relieve(data) {
  return request({
    url: `/andon/andonException/relieve`,
    method: 'post',
    data
  })
}

// 获取详情
export function getById(id) {
  return request({
    url: `/andon/andonException/${id}`,
    method: 'get'
  })
}

// 安灯异常导出报表
export function andonExceptionExport(data) {
  return request({
    url: `/andon/andonException/export`,
    responseType: 'blob',
    method: 'post',
    data
  })
}
